<?php
// +----------------------------------------------------------------------
// | ThinkPHP
// +----------------------------------------------------------------------
// | Copyright (c) 2008 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
// $Id$

function rbacCheck() {
	// 启用用户认证
	if(C('USER_AUTH_ON')) {
		// 启用权限认证 调用RBAC组件
		Think::import('Think.RBAC.RBAC');
		RBAC::checkLogin();
	}
}
Tag::add('app_run','rbacCheck');
?>